package main

import (
	"fmt"
	"time"
)

func a()  {
	for i := 1; i < 10; i++ {
		fmt.Println("A = ", i)
	}
}

func b()  {
	for i := 1; i < 10; i++ {
		fmt.Println("B = ", i)
	}
}
func chTest(c chan map[string]string)  {
	m := <-c
	fmt.Println(m["aa"])
	close(c)
}

func main()  {
	//runtime.GOMAXPROCS(2)
	//go a()
	//go b()
	ch := make(chan map[string]string)
	m := map[string]string{"aa":"bb"}
	go chTest(ch)
	ch <- m
	time.Sleep(time.Second)
}
